package com.yituo.mjworld.core.utils;

/**
 * @author xq
 */
public class Constant {

  public static final String DOMAIN_DEV = "http://192.168.100.122:8080/";
  public static final String DOMAIN_PRO = "http://imopei.95by.cn/";
  public static boolean IS_DEV = true;

  public static void init() {
    String osname = System.getProperty("os.name");
    if ("Windows 7".equals(osname)) {
      IS_DEV = true;
    } else if ("Windows Server 2008 R2".equals(osname)) {
      IS_DEV = false;
    } else {
      System.out.println("未定义的操作系统!默认为开发模式!");
    }
  }

  /**
   * 获取域.
   *
   * @return
   */
  public static String getDomain() {
    if (Constant.IS_DEV) {
      return Constant.DOMAIN_DEV;
    }
    return Constant.DOMAIN_PRO;
  }

  public static String getDomainDev() {
    return Constant.DOMAIN_DEV;
  }

  public static String getDomainPro() {
    return Constant.DOMAIN_PRO;
  }
}
